package com.winning.sx.microframework.common.config;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class IntSerializer extends JsonSerializer<Integer> {

    private static IntSerializer _instance=null;
    public static IntSerializer instance(){
        if (null==_instance){
                 _instance=new IntSerializer();
        }

        return _instance;
    }


    @Override
    public void serialize(Integer value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
        gen.writeString(value+"");
    }
}

